import { Injectable, Logger } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { ConfigService } from '@nestjs/config';
import { BaseService } from '@wwjCommon/base/base.service';
import { CacheService } from '@wwjCommon/cache/cache.service';
import { LoggingService } from '@wwjCommon/logging/logging.service';
import { UploadService } from '@wwjVendor/upload/upload.service';
import { PayService } from '@wwjVendor/pay/pay.service';
import { SmsService } from '@wwjVendor/sms/sms.service';
import { NoticeService } from '@wwjVendor/notice/notice.service';

@Injectable()
export class CoreMemberCashOutAccountService extends BaseService<any> {
  private readonly logger = new Logger(CoreMemberCashOutAccountService.name);

  constructor(
    @InjectRepository(Object)
    protected readonly repository: Repository<any>,
    private readonly cacheService: CacheService,
    private readonly configService: ConfigService,
    private readonly loggingService: LoggingService,
    private readonly uploadService: UploadService,
    private readonly payService: PayService,
    private readonly smsService: SmsService,
    private readonly noticeService: NoticeService,
  ) {
    super(repository);
  }

  /**
   * getInfo
   * 对应 PHP: CoreMemberCashOutAccountService_core::getInfo()
   * 逻辑类型: undefined - undefined
   */
  async getInfo(account_id: number, site_id: number, member_id: number) {
    // 基于PHP真实逻辑: getInfo
    // PHP原文: $field = 'account_id,site_id,member_id,account_type,bank_name,realname,account_no, transfer_payment_code';         return $this->model->where([['accou...
const field = 'account_id,site_id,member_id,account_type,bank_name,realname,account_no, transfer_payment_code';
        return this.model.where([['account_id', '=', account_id], ['site_id', '=', site_id], ['member_id', '=', member_id))).field(field).findOrEmpty().toArray(;
  }
  }
}
